var receivers = ['guanlongxu', 'candychen', 'miyawang', 'vincenjiang', 'fangzheng'];
var url = "http://121.43.104.67:3002/sendAlarm";
var axios = require('axios');
const Alarm = {
  send(params) {
    var data = {
      type: "normalMsg",
      subject: params.subject,
      msg: params.msg,
      receivers: receivers
    }
    axios({
      url: url,
      method: 'POST',
      headers: {'Content-Type': 'application/json'},
      data: JSON.stringify(data)
    }).then(res => {
      console.log(res.data);
    }).catch(err => {
      console.log(err);
    })
  }
}
module.exports = Alarm;